Repository navigation
feat: record a demo script in a sandbox as a silent MP4 with step timings (#2) - #10
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
flow-reel record demo.tsreplays a Playwright demo script in a container (Xvfb + headed Chromium in kiosk mode)while ffmpeg captures the display, and writes:
demo.mp4: silent, 1920×1080, 30 fpsdemo.transcript.json: each step's timings (schema v1)demo.events.json: the runner's moves, clicks, typing and scrolls (schema v1).flow-reel/demo/master.mp4: the 2560×1440 master for later polish, in a folder that git-ignores itselfThe script gets a wrapped
page: actions ease the mouse to their target and type visibly, so the polish tickets candraw the cursor, zooms and click sounds from
events.json.Why
There was no way to record an agent's demo headlessly and reproducibly. Runs are stabilised (fixed viewport, clock,
random seed, reduced motion, a network-idle wait and time budgets per action) so the same script gives the same
video: the same steps, each starting within ±150 ms.
Design:
planning/GH-1-narrated-reproducible-feature-demos/(story decisions 009–013, GH-2 decisions 001–007).How it was tested
npm run typecheck,npm test: 36 unit tests (schemas, easing, wrapped page, loader, launcher arguments, networkidle).
npm run test:e2e: builds the image and records a fixture app twice. It checks the resolutions and frame count,that both JSON files validate, step starts within ±150 ms between runs, and clicks within 2 frames of the video
frame where they show.
npm packinstall into an empty project.with wrong timing (decision 007).
Closes #2